<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Delete extends CI_Controller {
function __construct()
    {
        parent::__construct();
    	$this->load->library('session');
		$this->load->helper('url');
    	$this->load->database();
    	$this->load->model("centermod");
    	
	}
	
	function deltrans(){
		$idinvoice=$this->input->get_post("idinvoice");
		$idinscriptions=$this->input->get_post("idinscriptions");
		$idbus=$this->input->get_post("idbus");
		$idtour=$this->input->get_post("idtour");
		$this->centermod->deletetranscation($idinvoice,$idinscriptions);
		$date=array("idtour"=>$idtour,"idbus"=>$idbus);
		$this->load->view("delete_trasition",$date);
	}
	
//delete group
	function deltransgroup(){
		$idinvoice=$this->input->get_post("idinvoice");
		$idinscriptions=$this->input->get_post("idinscriptions");
		$idbus=$this->input->get_post("idbus");
		$idtour=$this->input->get_post("idtours");
		if($idinscriptions !="")
		{
		$this->centermod->deletetranscationgourp($idinvoice,$idinscriptions);
		$date=array("idtour"=>$idtour,"idbus"=>$idbus);
		$this->load->view("delete_trasition",$date);
		}
	}

	function deleteuser()
	{
		$idusers=$this->input->get_post("idusers"); 
		$where="idusers=$idusers";
		$data=array("pwd"=>"eerr!psd8877");
		$this->centermod->updatetemplate("users",$data,$where);
		redirect('index.php?liste/listuser', 'refresh');
	}
	
/****************** party for partner module   ************************/

	function deletepartner()
	{
		$idpartners=$this->input->get_post("idpartners"); 
		$where="idpartners=$idpartners";
		$data=array("pwd"=>"eerr!psd8877");
		$this->centermod->updatetemplate("partners",$data,$where);
		redirect('index.php?liste/listpartners', 'refresh');
	}
	
/*********************************************************************/		
}